var onMore = function() {
	Dackage.setCss('.mask', 'display', 'block')
}
var onClose = function() {
	Dackage.setCss('.mask', 'display', 'none')
}
var handleFiles = function() {
		var fileList = this.files
		console.log(getSzie(fileList, 0))
		var reader = new FileReader()
		reader.onload = function(e) {
			result = e.target.result
			console.log(result)
		}
		reader.readAsText(fileList[0])
	}
onload = function() {
	var save = function() {
		exportRaw(fileName.value, writer.value)
	}
	var fileName = document.getElementById('file_name')
	var saveBotton = document.getElementById('save')
	var writer = document.getElementById('writer')
	saveBotton.addEventListener('click', save)
	Dackage.$('#menu').addEventListener('click', onMore)
	Dackage.$('.mask-close').addEventListener('click', onClose)
	Dackage.$('#file').addEventListener('onchange', handleFiles)
	Dackage.$('#open').addEventListener('click', function(){
		console.log(1)
		Dackage.$('#file').click()
	})
}